Skip to content

Conversation

@ethanmusser
Copy link
Contributor

@ethanmusser ethanmusser commented Nov 5, 2025

Description

@swift-nav/algint-team

Install a CMake package configuration file.

This change permits downstream users configuring with CMake to include the SBP C bindings in their project as follows.

find_package(libsbp CONFIG REQUIRED)
target_link_libraries(my_target PRIVATE swiftnav::sbp)

Currently, those same consumers need to create a custom Findlibsbp.cmake find module script.

API compatibility

Does this change introduce a API compatibility risk?

No. This change simply adds to the installed files. The previous sbp-export target build tree export is preserved.

API compatibility plan

N/A

JIRA Reference

N/A

However, resolves #1528.

@ethanmusser ethanmusser requested a review from a team as a code owner November 5, 2025 20:41
@martin4861 martin4861 self-assigned this Nov 6, 2025
Copy link
Contributor

@martin4861 martin4861 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ethanmusser , thank you for contributing 🚀 Could you also update the test package in c/test_package/CMakeLists.txt please, so that it uses find_package(libsbp REQUIRED) instead of find_library and then link the libraries against swiftnav::sbp?

@ethanmusser
Copy link
Contributor Author

Hi @ethanmusser , thank you for contributing 🚀 Could you also update the test package in c/test_package/CMakeLists.txt please, so that it uses find_package(libsbp REQUIRED) instead of find_library and then link the libraries against swiftnav::sbp?

@martin4861 No problem, thanks for checking it out! I updated the test_package as requested.

@martin4861 martin4861 merged commit 3a12649 into swift-nav:master Nov 11, 2025
18 of 21 checks passed
@ethanmusser ethanmusser deleted the ethanmusser/feat/1528-cmake-add-package-configuration branch November 11, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C/C++] CMake: Install a package configuration file

2 participants